/**
 * Created by MingyueZhang on 2017/6/20.
 */
import {BaseApiMethod, BaseService} from './business.service';
import autotipMixin from '../mixin/autotip.mixin';
import autotip from '../decorator/autotip.decorator';
import autotipClass from '../decorator/autotipClass.decorator';
import autoloadingMixin from '../mixin/autoloading.mixin';
import autoloading from '../decorator/autoloading.decorator';
import {traits} from 'traits-decorator';

class ApiMethod extends BaseApiMethod {

    /*登录用户信息*/
    loginUser(data){
        return this.postTest("LOGIN_USER",data);
    }
    /*获取用户信息列表*/
   getUserInfoList(data){
       return this.post("GET_USERINFOLIST",data);
    }
    /*获取用户身份信息*/
    getIdentityInfoById(data){
        return this.post("GET_USER",data);
    }
    /*获取用户基本信息*/
    getBasicsInfoById(data){
        return this.post("GET_BASICSINFO",data);
    }
    /*获取用户联系人*/
    getContastsInfoById(data){
        return this.post("GET_CONTACTSINFO",data);
    }
}



class  UserInfoService{

    constructor(UtilsService) {
        //super(UtilsService);
        this.api = new ApiMethod(UtilsService);
    }

    loginUser(data){
        return this.api.loginUser(data);
    }
    getUserInfoList(data){
        return this.api.getUserInfoList(data);
    }
    getIdentityInfoById(data){
        return this.api.getIdentityInfoById(data);
    }
    getBasicsInfoById(data){
        return this.api.getBasicsInfoById(data);
    }
    getContastsInfoById(data){
        return this.api.getContastsInfoById(data);
    }


}
angular.module('biz-services').factory("UserInfoService", ["UtilsService",function (UtilsService) {
    return new UserInfoService(UtilsService);
}]);
